package com.jiayinlending.jiayindai.activity.myrepay;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.jiayinlending.jiayindai.R;
import com.jiayinlending.jiayindai.activity.base.BaseActivity;
import com.jiayinlending.jiayindai.adapter.RepaymentRecordAdpater;
import com.jiayinlending.jiayindai.net.bean.Info;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;

public class RepaymentRecordActivity extends BaseActivity {

    @Bind(R.id.recyler_recordlist)
    RecyclerView recylerRecordlist;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ButterKnife.bind(this);
        inITtitle();
        initrecyler();
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_repayment_record;
    }

    private void initrecyler() {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
        recylerRecordlist.setLayoutManager(linearLayoutManager);
        ArrayList<Info> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(new Info());
        }
        recylerRecordlist.setAdapter(new RepaymentRecordAdpater(this, list));
    }

    private void inITtitle() {
        getToolbarTitle().setText("还款记录");
        getSubTitle().setText("");
    }
}
